﻿//using System;
//using System.Collections.Generic;
//using System.Text;
//using System.Drawing;
//using Microsoft.DirectX;
//using Microsoft.DirectX.Direct3D;

//namespace MulticastTV
//{
//    public partial class d3d
//    {
//        private Microsoft.DirectX.Direct3D.Font osdNameFont;
//        private Microsoft.DirectX.Direct3D.Font osdNumberFont;
//        private Microsoft.DirectX.Direct3D.Font osdGroupFont;
//        private Microsoft.DirectX.Direct3D.Font osdClockFont;
//        private Microsoft.DirectX.Direct3D.Font osdEpgFont;
//        private Microsoft.DirectX.Direct3D.Font osdMiscFont;

//        private System.Drawing.Font gdiFont;

//        private RectangleF osdRectangle;

//        //                                                  24          25
//        //                                                  *-----------* 
//        //    OSD                                           |26   A   27|
//        // 4 *----------------------------------------------------------* 5
//        //   | *---------------*  *---------------------------------*   |
//        //   | |8     r1     9 |  | 12             r2             13|   |
//        //   | |11          10 |  | 15                            14|   |
//        //   | *---------------*  *---------------------------------*   |
//        //   |                     ---------------------------------    |
//        //   | *---------------*  *---------------------------------*   |
//        //   | |16    r3    17 |  |20            r4               21|   |
//        //   | |19          18 |  |23                             22|   |
//        //   | *---------------*  *---------------------------------*   |
//        // 7 *----------------------------------------------------------* 6

//        // 

//        private void updateOsd()
//        { 
//            // x and y offset in settings
//            float OsdWidth = ((float) Properties.Settings.Default.EpgPopUpWidthPercent/100.0f) * (float)displaySize.Width;
//            osdRectangle.X = (float)displaySize.Width - ( OsdWidth + (float)Properties.Settings.Default.EpgPopUpXOffset);
//            osdRectangle.Width = OsdWidth;
//            osdRectangle.Y = (float)displaySize.Height - Properties.Settings.Default.EPGPopUpHeight - (float)Properties.Settings.Default.EPGpopupYOffset;
//            osdRectangle.Height = (float)Properties.Settings.Default.EPGPopUpHeight;

//            vertices[4].X = osdRectangle.X;
//            vertices[4].Y = osdRectangle.Y;
//            vertices[4].Tu = 0.0f;
//            vertices[4].Tv = 0.0f;
//            //vertices[4].Z= 2.0f;
//            vertices[5].X = osdRectangle.X + osdRectangle.Width;
//            vertices[5].Y = osdRectangle.Y;
//            vertices[5].Tu = 1.0f;
//            vertices[5].Tv = 0.0f;
//            //vertices[5].Z = 2.0f;
//            vertices[6].X = osdRectangle.X + osdRectangle.Width;
//            vertices[6].Y = osdRectangle.Y + osdRectangle.Height;
//            vertices[6].Tu = 1.0f;
//            vertices[6].Tv = 1.0f;
//            //vertices[6].Z = 2.0f;
//            vertices[7].X = osdRectangle.X;
//            vertices[7].Y = osdRectangle.Y + osdRectangle.Height;
//            vertices[7].Tu = 0.0f;
//            vertices[7].Tv = 1.0f;
//            //vertices[7].Z = 2.0f;

//            vertices[4].Color = unchecked((int)0x78ffffff); // low left
//            vertices[5].Color = unchecked((int)0x78ffffff); // high left
//            vertices[6].Color = unchecked((int)0x78ffffff); // low right
//            vertices[7].Color = unchecked((int)0x78ffffff); // high right

//        }


//        private void drawOsd()
//        {

//            device.SetTexture(0, null);
//            device.DrawPrimitives(PrimitiveType.TriangleFan, 4, 2);
//        }
//    }
//}
